-- GENERATED SPELL FOR [Bristleback Thornweaver] --


function spell0_3261(pUnit, Event) --@Entangling Roots,n/a--
pUnit:FullCastSpellOnTarget(12747,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3261', 11500, 1)
end

function spell1_3261(pUnit, Event) --@Thorns,n/a--
pUnit:FullCastSpellOnTarget(782,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_3261', 688, 1)
end

function Sorts_3261(pUnit, Event)
local choix_sorts_3261 = math.random(0, 1)
if choix_sorts_3261 == 0 then
pUnit:RegisterEvent('spell0_3261', 1, 1)
end
if choix_sorts_3261 == 1 then
pUnit:RegisterEvent('spell1_3261', 1, 1)
end
end

function mob3261_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_3261', math.random(1500, 3000), 1)
end

function mob3261_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3261_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob3261_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(3261, 1, 'mob3261_Action')
RegisterUnitEvent(3261, 2, 'mob3261_Leave')
RegisterUnitEvent(3261, 3, 'mob3261_Kill')
RegisterUnitEvent(3261, 4, 'mob3261_Die')
